<!DOCTYPE html>
<!--thymeleaf 前置和命名空间-->
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>大帅银行 | 您的金融助手</title>

    <!-- Bootstrap -->
    <link th:href="@{/css/bootstrap/dist/css/bootstrap.min.css}" rel="stylesheet">
    <!-- Font Awesome -->
    <link th:href="@{/css/font-awesome/css/font-awesome.min.css}" rel="stylesheet">
    <!-- NProgress -->
    <link th:href="@{/css/nprogress/nprogress.css}" rel="stylesheet">
  
    <!-- iCheck -->
    <link th:href="@{/css/iCheck/skins/flat/green.css}" rel="stylesheet">
    <!-- bootstrap-progressbar -->
    <link th:href="@{/css/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css}" rel="stylesheet">
    <!-- JQVMap -->
    <link th:href="@{/css/jqvmap/dist/jqvmap.min.css}" rel="stylesheet"/>

    <!-- Custom Theme Style -->
    <link th:href="@{/css/custom.css}" rel="stylesheet">
    <style>
      
    </style>
  
    
  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
            <div class="navbar nav_title" style="border: 0;">
              <a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>大帅银行</span></a>
            </div>

            <div class="clearfix"></div>

            <!-- menu profile quick info -->
            <div class="profile">
              <div class="profile_pic">
                <img th:src="@{/img/logo.png}" alt="..." class="img-circle profile_img">
              </div>
              <div class="profile_info">
                <span>欢迎您,</span>
                <h2 th:text="${#authentication.name == 'anonymousUser' ? '请登录': #authentication.principal.empName}"></h2>
              </div>
            </div>
            <!-- /menu profile quick info -->

            <br />

            <!-- sidebar menu -->
            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
              <div class="menu_section">
                <h3>功能</h3>
                <ul class="nav side-menu">
                  <li><a th:href="@{/}"><i class="fa fa-home"></i> 返回首页 </span></a>
                    
                  </li>
                 
                  
                  <li><a><i class="fa fa-table"></i> 客户管理 <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a th:href="@{/customer/show_customer}">查看客户</a></li>
                      <li><a th:href="@{/customer/add_customer}">添加客户</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-clone"></i>贷款申请管理 <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a th:href="@{/loan/show_loans_apply}">查看贷款申请</a></li>
                      <li><a th:href="@{/loan/add_apply}">添加贷款申请</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-clone"></i>贷款审批 <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a th:href="@{/loan/show_loans_apply}">审批贷款</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-bar-chart-o"></i>贷款产品管理<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a th:href="@{/loan_produce/show_list}">查看看贷款产品</a></li>
                      <li><a th:href="@{/loan_produce/add_produce}">添加贷款产品</a></li>
                    </ul>
                  </li>
                  <li><a><i class="fa fa-bar-chart-o"></i>员工管理<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a th:href="@{/emp/show_emps}">查看员工</a></li>
                      <li><a th:href="@{/emp/add_emp}">添加员工</a></li>
                    </ul>
                  </li>

                </ul>
              </div>
              
              </div>

            </div>
            <!-- /sidebar menu -->

            <!-- /menu footer buttons -->
            <div class="sidebar-footer hidden-small">
              <a data-toggle="tooltip" data-placement="top" title="Settings">
                <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="FullScreen">
                <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="Lock">
                <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="Logout">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
              </a>
            </div>
            <!-- /menu footer buttons -->
          </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
          
          <div class="nav_menu">
            <nav>
              <div class="nav toggle">
                <a id="menu_toggle"><i class="fa fa-bars"></i></a>
              </div>

              <ul class="nav navbar-nav navbar-right">

                <li class="">
                  <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <!--                    <span th:text="${#authentication == 'anonymousUser'?'请登录': #authentication.principal.empName}"></span>-->
                    <span th:text="${#authentication.name == 'anonymousUser' ? '请登录': #authentication.principal.empName}"><span/>
                    <span class=" fa fa-angle-down"></span>
                  </a>
                  <ul class="dropdown-menu dropdown-usermenu pull-right">
                    <li><a th:href="@{/emp/login}"><i class="fa fa-sign-out pull-right"></i>登录</a></li>
                    <li><a th:href="@{/logout}"><i class="fa fa-sign-out pull-right"></i>注销</a></li>
                  </ul>
                </li>

                <li role="presentation" class="dropdown">
                  <a href="javascript:;" class="dropdown-toggle info-number" data-toggle="dropdown" aria-expanded="false">
                    <i class="fa fa-envelope-o"></i>
                   
                  </a>
                </li>
              </ul>
                  
            </nav>
          </div>
        </div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col"  role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>客户管理<small>查看客户信息</small></h3>
              </div>

              <div class="title_right">
                <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
                  <div class="input-group">
                    <input type="text" class="form-control" placeholder="Search for...">
                    <span class="input-group-btn">
                      <button class="btn btn-default" type="button">Go!</button>
                    </span>
                  </div>
                </div>
              </div>
            </div>

            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>显示所有的客户信息 <small>请查看</small></h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                      <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                        <ul class="dropdown-menu" role="menu">
                          <li><a href="#">Settings 1</a>
                          </li>
                          <li><a href="#">Settings 2</a>
                          </li>
                        </ul>
                      </li>
                      <li><a class="close-link"><i class="fa fa-close"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
<!--                    <p class="text-muted font-13 m-b-30">-->
<!--                      DataTables has most features enabled by default, so all you need to do to use it with your own tables is to call the construction function: <code>$().DataTable();</code>-->
<!--                    </p>-->
                    <div th:if="${result.code == 2000}">
                      <table id="datatable" class="table table-striped table-bordered">
                        <thead>
                        <tr>
                          <th>编号</th>
                          <th>客户姓名</th>
                          <th>身份类型</th>
                          <th>教育程度</th>
                          <th>证件类型</th>
                          <th>证件号码</th>
                          <th>所在省份</th>
                          <th>所在城市</th>
                          <th>市/县/区</th>
                          <th>家庭住址</th>
                          <th>联系电话</th>
                          <th>工作单位</th>
                          <th>单位地址</th>
                          <th>功能</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="c,s : ${result.data}">
                          <td th:text="${s.count}"></td>
                          <td th:text="${c.customerName}"></td>
                          <td th:text="${c.customerType.valueName}"></td>
                          <td th:text="${c.educationType.valueName}"></td>
                          <td th:text="${c.certificateType.valueName}"></td>
                          <td th:text="${c.certificateNo}"></td>
                          <td th:text="${c.province.name}"></td>
                          <td th:text="${c.city.name}"></td>
                          <td th:text="${c.town.name}"></td>
                          <td th:text="${c.homeAddress}"></td>
                          <td th:text="${c.telNo}"></td>
                          <td th:text="${c.coName}"></td>
                          <td th:text="${c.coAddress}"></td>
                          <td>
                            <div class="dropdown">
                              <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                功能
                                <span class="caret"></span>
                              </button>
                              <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                <!--使用？进行传参，对应的方法参数为@RequestParam注解标识的参数，如果不写，该参数默认有这个注解-->
                                <li> <a th:href="@{/customer/show_details(customerId = ${c.customerId})}">查看详情</a></li>
                                <li><a th:href=" @{/loan/add_apply/{customerId}(customerId=${c.customerId})}">添加贷款申请</a></li>
                                <!--使用url直接传递参数，对应的注解为@@PathVariable-->
                                <li><a th:href="@{/customer/remove_customer/{customerId}(customerId=${c.customerId})}">删除客户</a></li>

                              </ul>
                            </div>
<!--                           -->

                          </td>
                        </tr>
                        </tbody>

                      </table>
                    </div>

                  </div>
                </div>
              </div>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <footer>
          <div class="pull-right">
            大帅银行 - 您的金融助手 by <a href="https://www.dsbank.com">大帅银行</a>
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>
    </div>
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/css/bootstrap/dist/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/fastclick.js}"></script>
    <script th:src="@{/js/nprogress.js}"></script>
    <script th:src="@{/js/Chart.js}"></script>
    <script th:src="@{/js/gauge.js}"></script>
    <script th:src="@{/js/bootstrap-progressbar.min.js}"></script>
    <script th:src="@{/js/icheck.js}"></script>
    <script th:src="@{/js/skycons.js}"></script>
    <script th:src="@{/js/jquery.flot.js}"></script>
    <script th:src="@{/js/jquery.flot.pie.js}"></script>
    <script th:src="@{/js/jquery.flot.time.js}"></script>
    <script th:src="@{/js/jquery.flot.stack.js}"></script>
    <script th:src="@{/js/jquery.flot.resize.js}"></script>
    <script th:src="@{/js/jquery.flot.orderBars.js}"></script>
    <script th:src="@{/js/jquery.flot.spline.min.js}"></script>
    <script th:src="@{/js/curvedLines.js}"></script>
    <script th:src="@{/js/date.js}"></script>
    <script th:src="@{/js/jquery.vmap.js}"></script>
    <script th:src="@{/js/jquery.vmap.world.js}"></script>
    <script th:src="@{/js/jquery.vmap.sampledata.js}"></script>
    <script th:src="@{/js/moment.min.js}"></script>
    <script th:src="@{/js/daterangepicker.js}"></script>
    <script th:src="@{/js/custom.min.js}"></script>


  </body>
</html>
